package com.freshmarket.freshmarket.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.freshmarket.freshmarket.entity.ProductType;
import com.freshmarket.freshmarket.dao.ProductTypeMapper;
import com.freshmarket.freshmarket.service.IProductTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Squirrel
 * @since 2020-09-04
 */
@Service
public class ProductTypeServiceImpl extends ServiceImpl<ProductTypeMapper, ProductType> implements IProductTypeService {
    final ProductTypeMapper productTypeMapper;

    public ProductTypeServiceImpl(ProductTypeMapper productTypeMapper) {
        this.productTypeMapper = productTypeMapper;
    }

    @Override
    public List<ProductType> getList(){
        List<ProductType> productTypes = productTypeMapper.selectList(new QueryWrapper<>());
        return productTypes;
    }
}
